//
//  DDDADViewController.m
//  DDDAdMsgViewSdk
//
//  Created by summerthread on 09/01/2020.
//  Copyright (c) 2020 summerthread. All rights reserved.
//

#import "DDDADViewController.h"
#import <DDDAdMsgViewSdk/DDDAdMsgMainView.h>
#import <DDDAdMsgViewSdk/DDDAdMsgAdMessageManager.h>
@interface DDDADViewController ()
@property (nonatomic,strong) DDDAdMsgMainView *mainView;
@end

@implementation DDDADViewController

- (void)viewDidLoad
{
    NSLog(@"summer--%@",[DDDAdMsgAdMessageManager currentSdkVersion]);

    [super viewDidLoad];
    self.navigationItem.title = @"咨询";
    [self.view addSubview:self.mainView];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (DDDAdMsgMainView *)mainView {
    if (!_mainView) {
        CGFloat topHeight = [[UIApplication sharedApplication] statusBarFrame].size.height + 44.0;
        _mainView = [[DDDAdMsgMainView alloc]initWithFrame:CGRectMake(0.0, topHeight, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height - ([[UIApplication sharedApplication] statusBarFrame].size.height > 20?83:49) - ([[UIApplication sharedApplication] statusBarFrame].size.height > 20?34:0)) andRootViewController:self userName:@"" userHeaderImageStr:@""];
    }
    return _mainView;
}
@end
